<?php

	include("../classes/bQueue.class.inc");

	$q1 = new bQueue();
	
	$q1->enqueue("one");
	$q1->enqueue("two");
	$q1->enqueue("three");
	
	while($g = $q1->dequeue()) {
		
		echo $g." ";
	}
	
	echo "<br /><br />";
	
	$q2 = new bQueue(bQueue::FILO);
	
	$q2->enqueue("one");
	$q2->enqueue("two");
	$q2->enqueue("three");
	
	while($g = $q2->dequeue()) {
		
		echo $g." ";
	}
	
	echo "<br /><br />";
	
	$q3 = new bQueue(bQueue::FILO);
	
	$q3->enqueue("one");
	$q3->enqueue("two");
	$q3->enqueue("three");
	
	foreach($q3 as $g) {
		
		echo $g." ";
	}
	
	echo "<br /><br />";
		
	$q4 = new bQueue(bQueue::FIFO_PRIORITY);
	
	$q4->enqueue("one", 0.5);
	$q4->enqueue("two", 0.3);
	$q4->enqueue("three", 0.5);
	
	while($g = $q4->dequeue()) {
		
		echo $g." ";
	}
	
	echo "<br /><br />";
	
	$q5 = new bQueue(bQueue::FIFO_PRIORITY);
	
	$q5->enqueue("one", 0);
	$q5->enqueue("two", .8);
	$q5->enqueue("three", 0.5);
	
	foreach($q5 as $g) {
		
		echo $g." ";
	}
?>